Skip to content

Remove the index from the test case loop; simplify the cases object - #887

Merged
glennj merged 2 commits into
exercism:mainfrom
IsaacG:generator.no_idx
Aug 13, 2026
Merged

Remove the index from the test case loop; simplify the cases object#887
glennj merged 2 commits into
exercism:mainfrom
IsaacG:generator.no_idx

Conversation

@IsaacG

@IsaacG IsaacG commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summarized changes:

» g diff | grep '^[+-][^+-]' | sort | uniq -c
      1 +        "cases": cases,
      1 -        "cases": list(enumerate(cases)),
     90 +{% for case in cases %}
     90 -{% for idx, case in cases %}
      1 -{%- if idx == 0 %}
     60 -    {% if idx == 0 %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
     28 -  {% if idx == 0 %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
      1 +{%- if loop.first %}
     60 +    {% if loop.first %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
     28 +  {% if loop.first %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip

Summarized changes:
```
» g diff | grep '^[+-][^+-]' | sort | uniq -c
      1 +        "cases": cases,
      1 -        "cases": list(enumerate(cases)),
     90 +{% for case in cases %}
     90 -{% for idx, case in cases %}
      1 -{%- if idx == 0 %}
     60 -    {% if idx == 0 %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
     28 -  {% if idx == 0 %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
      1 +{%- if loop.first %}
     60 +    {% if loop.first %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
     28 +  {% if loop.first %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
```
@glennj
glennj merged commit 696410d into exercism:main Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants